<?php

namespace App\Http\Controllers\Home;

use App\Http\Controllers\Controller;
use App\Models\Article;
use Illuminate\Http\Request;
class ArticleController extends Controller{

    /**
     * index  
     * 
     * @param Request $request 
     * @access public
     * @return void
     */
    public function index(Request $request){
        $where[] = ['status','=',1];
        $articles =Article::where($where)->orderBy('sort','desc')->orderBy('id','desc')->paginate(5);
        return view('home.news.index',compact('articles'));
    }

    /**
     * [rules 交易规则]
     * @param  Request $request [description]
     * @param  [type]  $symbol  [description]
     * @return [type]           [description]
     */
    public function detail(Request $request,$id){
         $article = Article::find($id);
         return view('home.news.detail',compact('article'));
    }



	
}